package com.jichangxiu.system.entity.dto.query;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jichangxiu.common.entity.dto.QueryEntity;
import com.jichangxiu.system.entity.bo.SysMenuBo;
import com.jichangxiu.system.entity.po.SysMenu;
import io.github.linpeilie.annotations.AutoMapper;
import io.github.linpeilie.annotations.AutoMappers;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * QuerySysMenu:
 *
 * @author JiChangXiu
 * @create 2024-06-28 13:44:29
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@Schema(description = "系统菜单表")
@AutoMappers({
        @AutoMapper(target = SysMenu.class, reverseConvertGenerate = false),
        @AutoMapper(target = SysMenuBo.class, reverseConvertGenerate = false)
})
public class QuerySysMenu extends QueryEntity {

    /**
     * ID
     */
    @Schema(description = "ID")
    private String id;

    /**
     * ID列表
     */
    @Schema(description = "ID列表")
    private List<String> idList;

    /**
     * 编码
     */
    @Schema(description = "编码")
    private String no;

    /**
     * 标识
     */
    @Schema(description = "标识")
    private String code;

    /**
     * 名称
     */
    @Schema(description = "名称")
    private String name;

    /**
     * 图标
     */
    @Schema(description = "图标")
    private String icon;

    /**
     * 路径
     */
    @Schema(description = "路径")
    private String path;

    /**
     * 分类
     */
    @Schema(description = "分类")
    private String type;

    /**
     * 类型
     */
    @Schema(description = "类型")
    private String category;

    /**
     * 组件
     */
    @Schema(description = "组件")
    private String component;

    /**
     * 父ID
     */
    @Schema(description = "父ID")
    private String parentId;

    /**
     * 菜单排序
     */
    @Schema(description = "菜单排序")
    private BigDecimal sort;

    /**
     * 是否隐藏
     */
    @Schema(description = "是否隐藏")
    private Boolean hidden;

    /**
     * 是否启用
     */
    @Schema(description = "是否启用")
    private Boolean enabled;

    /**
     * 启用者
     */
    @Schema(description = "启用者")
    private String enabledBy;

    /**
     * 启用时间
     */
    @Schema(description = "启用时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date enabledTime;

    /**
     * 是否扩展
     */
    @Schema(description = "是否扩展")
    private Boolean isExtend;

    /**
     * 只平台级别菜单
     */
    @Schema(description = "只平台级别菜单")
    private Boolean onlyPlatform = false;

}